package com.example.commen.utile

/**
 * @author zyju
 * @date 2024/3/27 10:34
 */
/**
 * @param resStr: 是空或null时返回的数据
 * */
fun String?.EmptyOrNullTo0(resStr:String):String{
    if (this.isNullOrBlank()){
        return resStr
    }
    return this
}
fun String?.EmptyOrNullTo0():String{
   return this.EmptyOrNullTo0("0")
}
fun CharSequence.toString(str:String):String{
    return this.toString().EmptyOrNullTo0(str)
}
